package com.zcup.designer.construct.flyweight;

public class Client {
    public static void main(String[] args) {
        int state = 22;
        FlyweightFactory factory = new FlyweightFactory();

        Flyweight x = factory.getFlyweight("X");
        x.operation(--state);
        Flyweight y = factory.getFlyweight("Y");
        x.operation(--state);
        Flyweight z = factory.getFlyweight("Z");
        x.operation(--state);
        Flyweight uf = new UnsharedConcreteFlyweight();
        uf.operation(--state);

    }
}
